package com.atxiaodei.kabudaspringannotation.demo.annotaions.configures.configuration;

import com.atxiaodei.kabudaspringannotation.project.entity.Person;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created by kabuda
 */
@Configuration
public class MyConfig {

    @Bean
    public Person person1(){
        return new Person("Tom",18);
    }

    // 添加一个方法
    @Bean
    public Person person(){
        return person1();
    }
}
